home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-11 | 729 b | 28 lines | [TEXT/ToyS] |
- --
- -- This script asks all the non-essential applications running on your Macintosh to
- -- quit. The property appsToKeep lists those applications you consider essential
- --
-
- property appsToKeep : {"Finder", "Eyes", "Monitor"}
-
- set appList to list processes
- repeat with i from 1 to count of appList
- set appName to item i of appList
- set appInfo to get process appName
- if not onlyBackground of appInfo then
- set skipIt to false
- repeat with j from 1 to count of appsToKeep
- if appName = (item j of appsToKeep) then
- set skipIt to true
- exit repeat
- end if
- end repeat
-
- if not skipIt and appName ≠ (get current process) then
- tell application appName
- activate
- quit
- end tell
- end if
- end if
- end repeat